.PHONY:all
all:libmethod.so libmethod.a
libmethod.so:mymath_d.o myPrint_d.o
	gcc -shared mymath_d.o myPrint_d.o -o libmethod.so
mymath_d.o:mymath.c
	gcc -c -fPIC mymath.c -o mymath_d.o
myPrint_d.o:myPrint.c
	gcc -c -fPIC myPrint.c -o myPrint_d.o
libmethod.a:mymath_s.o myPrint_s.o
	ar rc libmethod.a myPrint_s.o mymath_s.o
mymath_s.o:mymath.c
	gcc -c mymath.c -o mymath_s.o
myPrint_s.o:myPrint.c
	gcc -c myPrint.c -o myPrint_s.o

.PHONY:output
output:
	mkdir -p  output/lib
	mkdir -p output/include
	cp ./*.h output/include
	cp ./*.a output/lib
	cp ./*.so output/lib
.PHONY:clean
clean:
	rm -rf *.o libmethod.a libmethod.so output
